﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace DC2010.Tools
{
    public partial class FolderTextBox : UserControl
    {
        public FolderTextBox()
        {
            InitializeComponent();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {

        }

        private void textBox1_MouseHover(object sender, EventArgs e)
        {
            textBox1.BackColor = Color.Aqua;
        }

        private void textBox1_MouseLeave(object sender, EventArgs e)
        {
            textBox1.BackColor = Color.White;
        }

        private void textBox1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                folderBrowserDialog1.ShowDialog();
                textBox1.Text = folderBrowserDialog1.SelectedPath;
            }
        }

        public string InnerText
        {
            get
            {
                return textBox1.Text;
            }
            set
            {
                textBox1.Text = value;
            }
        }

        public string PromptText
        {
            get
            {
                return textBox1.PromptText;
            }
            set
            {
                textBox1.PromptText = value;
            }
        }
    }
}
